home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 January: Mac OS SDK / Dev.CD Jan 96 SDK / Dev.CD Jan 96 SDK1.toast / Development Kits (Disc 1) / AppleScript / Development Tools / Sample Code / 7Edit / C Sources / SVEditUtils.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-25  |  2.7 KB  |  113 lines  |  [TEXT/MPS ]

  1. /*
  2.     SVEditUtils.h
  3.     
  4.     Version 3.0d7
  5.     
  6.     Copyright © Apple Computer UK Ltd. 1991,1992
  7.     
  8.     All rights reserved.
  9.     
  10.     Produced by : UK Developer Technical Support
  11.     AppleLink   : UK.DTS
  12. */
  13.  
  14.  
  15. #ifndef __SVEDITUTILS__
  16. #define __SVEDITUTILS__
  17.  
  18. /** 
  19.     This example is brought to you for the purposes of exploration and experimentation of
  20.     System 7.0.  It is not intended to form the basis of your own programs - but try out the code-
  21.     that's what it's there for 
  22. **/
  23.  
  24. /**
  25.     System 7.0 specifics-:
  26.  
  27.     We check the configuration on startup to see if we are running on a pre-7.0
  28.     machine. Actually we specifically check for the features of 7.0 which we need.
  29.     If the required features are absent CheckEnvironment will fail.
  30.  
  31.     GetTempFileName is borrowed from MacApp, to generate a unique file name based
  32.     on the date and time.  Used when saving via a temporary file
  33.     
  34.     New for 3.0d2:
  35.     
  36.     19-Feb-92 : NH : Grey Page Setup when no window
  37.     27-Feb-92 : NH : Remove test menu, gCurrSection
  38.     18-Mar-92 : NH : Add GreaterOf
  39.                      Change DrawDefaultOutline
  40.                                      Comments added
  41.     27-Mar-92 : NH : Arrow cursor before alerts
  42.         
  43.     New for 3.0d4:
  44.     
  45.     5-Aug-92  : NH : Added GetRectOfDialogItem, CtrlKeyPressed,OptionKeyPressed
  46. **/
  47.  
  48. #include <Types.h>
  49. #include <Quickdraw.h>
  50. #include <Packages.h>
  51. #include <GestaltEqu.h>
  52. #include <Editions.h>
  53. #include <Printing.h>
  54.  
  55. #ifndef __SVEDITGLOBALS__
  56. #include "SVEditGlobals.h"
  57. #endif
  58.  
  59. pascal Boolean GestaltAvailable();
  60.  
  61. pascal Boolean CheckEnvironment();
  62.  
  63. pascal void ShowError(Str255 theError,
  64.                       long   theErrorCode);
  65.  
  66. pascal Boolean FeatureIsImplemented(OSType theFeature,
  67.                                     short  theTestBit);
  68.  
  69. pascal void GetTempFileName(DPtr   aDoc,
  70.                             Str255 newString);
  71.  
  72. pascal Boolean Ours(WindowPtr aWindow);
  73.  
  74. pascal void SetShortMenus();
  75.  
  76. pascal void SetLongMenus();
  77.  
  78. pascal void SetStyleMenu(DPtr theDoc);
  79.  
  80. pascal void SetFontMenu(DPtr theDoc);
  81.  
  82. pascal void SetEditMenu(DPtr theDoc);
  83.  
  84. pascal void AdornDefaultButton(DialogPtr theDialog, short theItem);
  85.  
  86. pascal void DrawDefaultOutline(DialogPtr theDialog, short theItem);
  87.  
  88. pascal void RetrieveText(DialogPtr aDialog,
  89.                                                short     anItem,
  90.                                                Str255    aString);
  91.  
  92. pascal void SetText( DialogPtr aDialog,
  93.                                          short     itemNo,
  94.                                          Str255    theString);
  95.  
  96. pascal void GetRectOfDialogItem(DialogPtr theDialog, short theItem, Rect *theRect);
  97.  
  98. /*changed for 7.0 and Outline Fonts*/
  99.  
  100. pascal void SetSizeMenu(DPtr theDoc);
  101.  
  102. pascal long LesserOf(long A, long B);
  103.  
  104. pascal long GreaterOf(long A, long B);
  105.         
  106. pascal Boolean DoPageSetup(DPtr theDoc);
  107.  
  108. pascal Boolean CtrlKeyPressed(const EventRecord *theEvent);
  109.  
  110. pascal Boolean OptionKeyPressed(const EventRecord *theEvent);
  111.  
  112. #endif
  113.